Skip to main content

Vardiyalar Sorgusu

Shifts in Synergy Environment

In the Synergy environment, shifts are used to manage different workflows and time zones. This documentation explains how shifts in Synergy can be queried.

SQL Query

The following SQL query is used to pull the shifts that are defined in the Synergy database. This query is designed to retrieve shift information based on a specific culture code ('en-US').

Query Description:

  • 'SHIFTS' table: The main table where shift information is kept.
  • 'SHIFTSML' table: The table where shift information is kept for multilingual support.
  • The 'SHIFTS' and 'SHIFTSML' tables are associated using 'INNER JOIN'.
  • Filtering, 'SML. By making it through the 'CULTURE' field, only shifts with Turkish language settings are brought.

Fields Used:

  • 'S.CODE': The code for the shift.
  • 'SML.NAME': The name of the shift.
  • 'S.STARTTIME': The start time of the shift.
  • 'S.ENDTIME': The end time of the shift.
  • 'S.TOTALMINUTE': The total duration of the shift, in minutes.
  • 'S.BREAKMINUTE': The duration of the shift break, in minutes.
  • 'S.TIMEZONE': The time period in which the shift is valid.

SQL Query:

'''SQL SELECT S.CODE, SML.NAME, S.STARTTIME, S.ENDTIME, S.TOTALMINUTE, S.BREAKMINUTE, Q.TIMEZONE FROM SHIFTS S INNER JOIN SHIFTSML, SML, ON SML. SHIFTID = S.ID WHERE SML. CULTURE = 'en-US'